import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import '@/assets/global.less'
import '@/elementUI' // 1.注册elementUI组件
// 2.引入富文本编辑器插件
import VueQuillEditor from 'vue-quill-editor'
// 3.引入富文本编辑器css
// require styles
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
// import Editor from '@/components/Editor/myEditor'
// 5.引入时间的格式化插件
import dayjs from 'dayjs'
// 4.注册成为全局插件
Vue.use(VueQuillEditor)
// 6.原型上添加一个$formDate的属性(属性名随便写)
Vue.prototype.$formDate = (dateObj) => {
  // 借助dayjs内置的方法,把日期对象格式化成指定的格式,并把格式化好的字符串返回到调用处
  return dayjs(dateObj).format('YYYY-MM-DD HH:mm:ss')
}
Vue.config.productionTip = false

new Vue({
  router,
  store,
  // Editor,
  render: (h) => h(App)
}).$mount('#app')
